Add --name option to meorg output query#70
Merged
Conversation
c3933c5 to
5aec200
Compare
5aec200 to
ff86378
Compare
--by-name option to meorg output query--name option to meorg output query
ff86378 to
3d22183
Compare
The `/modeloutput` get endpoint requires specifying the `name` key when
querying by name however meorg_client is currently fixed to always query by id.
This change adds a `--name` argument to `meorg output query` to allow
for querying a model output by its name. For example:
meorg output query --name my-model-output
This change also updates the `model_id` argument to `meorg output query`
to be optional as a way to preserve the existing signature of the
command but still allow querying solely by the `--name` argument.
3d22183 to
bb8291b
Compare
bschroeter
reviewed
Jun 11, 2026
bschroeter
left a comment
Contributor
There was a problem hiding this comment.
Looks OK, just a question on what happens if neither ID or name are supplied. Does it still work, or at least return a useful error?
| @click.command("query") | ||
| @click.argument("model_id") | ||
| def model_output_query(model_id: str): | ||
| @click.option("--name", required=False, help="Name of model output entity.") |
Contributor
There was a problem hiding this comment.
@SeanBryan51, what happens if neither is supplied?
Contributor
Author
There was a problem hiding this comment.
Good catch! I've updated the command to output the help text if no arguments are supplied with click's no_args_is_help in 0e54b47
Contributor
Author
|
Thanks for the review @bschroeter, happy for this to go in when you are! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
/modeloutputget endpoint requires specifying thenamekey when querying by name however meorg_client is currently fixed to always query by id.This change adds a
--nameargument tomeorg output queryto allow for querying a model output by its name. For example:This change also updates the
model_idargument tomeorg output queryto be optional as a way to preserve the existing signature of the command but still allow querying solely by the--nameargument.